import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

/**
 * Created by root on 4/21/14.
 */
public class Triangle{
    public static void main(String[] args){

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        try {
            System.out.print("Enter a name:");
            String name = br.readLine();
            printAsterisk(name);
        }
        catch(IOException e){
            System.out.print("Error Message:" + e.getStackTrace());
        }
    }

    static void printAsterisk(String name){

        int number;
        number = name.length()/ 2 ;
        int row,column,space;
        String asterisk = "*";
        int position= number;

        for(row=1;row <= number;row++){
            for(space=1; space <= position; space++)
                System.out.print(" ");
            for(column = (row * 2) - 1; column >= 1 ; column--) {
                System.out.print(asterisk);
            }
            System.out.println("");
            position--;
        }
        position++;
        System.out.println(name);
        for(row=1;row<= number; row++){
            for(space=1; space <= position; space++)
                System.out.print(" ");
            for(column = ((number*2+1)- (row*2)); column >= 1 ; column--) {
                System.out.print(asterisk);
            }
            System.out.println("");
            position++;
        }

        }
}
